package com.wink.admin.entity;

import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;

/**
 * 系统菜单实体类（权限）
 *
 * @author xw
 * @date 2020/11/5 15:17
 */
@Data
@Entity
@Table(name = "sys_menu")
@TableName("sys_menu")
@EqualsAndHashCode(callSuper = true)
@org.hibernate.annotations.Table(appliesTo = "sys_menu", comment = "权限菜单表")
public class SysMenu extends BaseEntity {

    @Column(name = "code", columnDefinition = ("varchar(50) null comment '栏目代码'"))
    private String code;

    @Column(name = "name", columnDefinition = ("varchar(100) null comment '栏目名称'"))
    private String name;

    @Column(name = "sort", columnDefinition = ("int(11) not null default 0 comment '排序'"))
    private Integer sort;

    @Column(name = "parent_id", columnDefinition = ("bigint(20) not null default 0 comment '父节点ID'"))
    private Long parentId;

    @Column(name = "request_url", columnDefinition = ("varchar(200) null comment '请求路径'"))
    private String requestUrl;

    @Column(name = "type", columnDefinition = ("smallint(1) not null default 0 comment '类型(0:运营, 1:商户)'"))
    private Integer type;

    @Column(name = "level", columnDefinition = ("smallint(1) not null default 0 comment '栏目级别;1-目录,2-菜单,3-按钮）'"))
    private Integer level;

    @Column(name = "status", columnDefinition = ("tinyint(4) not null default 0 comment '菜单状态：0-正常,1-停用'"))
    private String status;

    @Column(name = "visible", columnDefinition = ("tinyint(4) not null default 0 comment '菜单显示：0-显示,1-隐藏'"))
    private String visible;
}
